project(iOCR C CXX Fortran)

find_package(Qt4 COMPONENTS QtCore QtGui QtXml REQUIRED)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

find_package(OpenCV REQUIRED)

#find_package(Boost COMPONENTS program_options REQUIRED)
#find_package(LAPACK REQUIRED)
#link_directories(/opt/armadillo/lib64)
#include_directories(/opt/armadillo/include)

# compiler flags
add_definitions( -Wall -O2 )

SET(iocr_SOURCES iocr.cpp mainwindow.cpp ip.cpp imagedocument.cpp ocr.cpp)
SET(iocr_HEADERS mainwindow.h imagedocument.h)
QT4_WRAP_CPP(iocr_HEADERS_MOC ${iocr_HEADERS})

add_executable(iocr
  ${iocr_SOURCES}
  ${iocr_HEADERS_MOC}
)
target_link_libraries(iocr
  #armadillo
  #lapack
  #blas
  #${Boost_MPI_LIBRARY}
  #${Boost_PROGRAM_OPTIONS_LIBRARY}
  ${QT_LIBRARIES}
  ${OpenCV_LIBS}
)

#SET(iocr1_SOURCES imageviewer-main.cpp imageviewer.cpp)
#SET(iocr1_HEADERS imageviewer.h)
#QT4_WRAP_CPP(iocr1_HEADERS_MOC ${iocr1_HEADERS})

#add_executable(iocr1
#  ${iocr1_SOURCES}
#  ${iocr1_HEADERS_MOC}
#)
#target_link_libraries(iocr1
#  #armadillo
# #lapack
#  #blas
#  #${Boost_MPI_LIBRARY}
#  #${Boost_PROGRAM_OPTIONS_LIBRARY}
#  ${QT_LIBRARIES}
#)
